﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;

namespace AFCEPF.Samples.WebSamples.Concepts
{
    public partial class View_SessionReceiver : System.Web.UI.Page
    {
        protected void Page_Load(object sender, EventArgs e)
        {
            fillValuesFromSession();
        }

        /// <summary>
        /// Récupère deux objets de Session, les recaste vers leur type 
        /// d'origine, et affecte leurs valeurs aux controles de la feuille.
        /// </summary>
        private void fillValuesFromSession()
        {
            string name = (string) Session["Name"];
            string firstName = (string)Session["FirstName"];

            lblName.Text = name;
            lblFirstName.Text = firstName;
        }
    }
}